//
// Created by wze-zero on 2024/7/9 009.
//
#include <iostream>
#include <cmath>

using namespace std;

int main() {
    int factor = 10;
    long long num = 0, sum = 0, n = 0;
    for (int i = 0; i < 10; ++i) {
        num = pow(factor, i) * 9 + n;
        sum += num;
        n = num;
    }
    cout << sum << endl;
    return 0;
}
